package com.yang.common.util;


import com.yang.common.model.StandardSubmit;

import java.util.concurrent.ConcurrentHashMap;

/**
 * 用于CMPP发送短信时，临时存储的位置
 */
public class CMPPSubmitRepoMapUtil {

    /**
     * 多线程，所以用ConcurrentHashMap
     */
    private static ConcurrentHashMap<Integer, StandardSubmit> map = new ConcurrentHashMap<>();

    public static void put(Integer sequence, StandardSubmit submit){
        map.put(sequence,submit);
    }

    public static StandardSubmit get(Integer sequence){
        return map.get(sequence);
    }

    public static StandardSubmit remove(Integer sequence){
        return map.remove(sequence);
    }
}
